using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Set Starting Point By Attribute Rule</para>
    /// <para>Adds a diagram rule to a diagram template to set diagram features currently represented in the diagram as starting points for tracing rules. The diagram features are queried from a given network source class or object table and can be filtered by their attributes.</para>
    /// <para>将逻辑示意图规则添加到逻辑示意图模板中，以将逻辑示意图中当前表示的逻辑示意图要素设置为追踪规则的起点。逻辑示意图要素是从给定的网络源类或对象表中查询的，并可按其属性进行筛选。</para>
    /// </summary>    
    [DisplayName("Add Set Starting Point By Attribute Rule")]
    public class AddSetStartingPointByAttributeRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddSetStartingPointByAttributeRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_network_source">
        /// <para>Network Source</para>
        /// <para>The network source class or object table that references the features or objects that will be set as starting points.</para>
        /// <para>引用将设置为起点的要素或对象的网络源类或对象表。</para>
        /// </param>
        public AddSetStartingPointByAttributeRule(object _in_utility_network, object _template_name, _is_active_value _is_active, object _network_source)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
            this._network_source = _network_source;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Set Starting Point By Attribute Rule";

        public override string CallName => "nd.AddSetStartingPointByAttributeRule";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _network_source, _where_clause, _junction_terminals, _description, _out_utility_network, _out_template_name];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Network Source</para>
        /// <para>The network source class or object table that references the features or objects that will be set as starting points.</para>
        /// <para>引用将设置为起点的要素或对象的网络源类或对象表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Source")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_source { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression to select the subset of features or objects in the specified source class or object table that will be set as starting points. For more information on SQL syntax, see SQL reference for query expressions used in ArcGIS.</para>
        /// <para>一个 SQL 表达式，用于选择指定源类或对象表中将设置为起点的要素或对象的子集。有关 SQL 语法的详细信息，请参阅 ArcGIS 中使用的查询表达式的 SQL 参考。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Junction Terminal(s)</para>
        /// <para><xdoc>
        ///   <para>The terminal IDs that will start tracing if the network source class or object table references network junctions with terminals.</para>
        ///   <para>All the terminal IDs retrieved for the junctions in the Network Source parameter are listed. They correspond to those in the Terminal Configurations section on the Network Properties tab.</para>
        ///   <para>When both the Expression and Junction Terminal(s) parameters are configured, the specified terminals must correspond to queried features or objects; otherwise, no starting points will be set.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>如果网络源类或对象表引用具有终端的网络联结，则将开始跟踪的终端 ID。</para>
        ///   <para>将列出为网络源参数中的交汇点检索到的所有终端 ID。它们对应于“网络属性”选项卡上的“终端配置”部分中的配置。</para>
        ///   <para>同时配置表达式和交汇点终端参数时，指定的终端必须与查询的要素或对象相对应;否则，将不设置起点。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Junction Terminal(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _junction_terminals { get; set; } = null;


        /// <summary>
        /// <para>Description</para>
        /// <para>The description of the rule.</para>
        /// <para>规则的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        public AddSetStartingPointByAttributeRule SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}